/////////////////////////////////////////////////////////////////////////////
// Name:        ttsmp3settingspanel.h
// Purpose:     
// Author:      Julian Smart
// Modified by: 
// Created:     19/02/2009 07:09:12
// RCS-ID:      
// Copyright:   (c) Anthemion Software Limited
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#ifndef _TTSMP3SETTINGSPANEL_H_
#define _TTSMP3SETTINGSPANEL_H_

/*
 * Includes
 */

////@begin includes
#include "wx/valgen.h"
#include "wx/hyperlink.h"
////@end includes

#include "tts/mp3encoder.h"

/*
 * Forward declarations
 */

////@begin forward declarations
class wxHyperlinkCtrl;
////@end forward declarations

/*
 * Control identifiers
 */

////@begin control identifiers
#define SYMBOL_WXTTSMP3SETTINGSPANEL_STYLE wxTAB_TRAVERSAL
#define SYMBOL_WXTTSMP3SETTINGSPANEL_TITLE wxEmptyString
#define SYMBOL_WXTTSMP3SETTINGSPANEL_IDNAME ID_TTSMP3SETTINGSPANEL
#define SYMBOL_WXTTSMP3SETTINGSPANEL_SIZE wxSize(400, 300)
#define SYMBOL_WXTTSMP3SETTINGSPANEL_POSITION wxDefaultPosition
////@end control identifiers

/**
    @class wxTTSMP3SettingsPanel
    
    @category{tts}
 */

class wxTTSMP3SettingsPanel: public wxPanel
{    
    DECLARE_DYNAMIC_CLASS( wxTTSMP3SettingsPanel )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxTTSMP3SettingsPanel();
    wxTTSMP3SettingsPanel( wxWindow* parent, wxWindowID id = SYMBOL_WXTTSMP3SETTINGSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXTTSMP3SETTINGSPANEL_POSITION, const wxSize& size = SYMBOL_WXTTSMP3SETTINGSPANEL_SIZE, long style = SYMBOL_WXTTSMP3SETTINGSPANEL_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXTTSMP3SETTINGSPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXTTSMP3SETTINGSPANEL_POSITION, const wxSize& size = SYMBOL_WXTTSMP3SETTINGSPANEL_SIZE, long style = SYMBOL_WXTTSMP3SETTINGSPANEL_STYLE );

    /// Destructor
    ~wxTTSMP3SettingsPanel();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

    /// Set info
    void SetInfo(const wxMP3EncoderInfo& info) { m_info = info; }

    /// Get info
    const wxMP3EncoderInfo& GetInfo() const { return m_info; }

    /// Data transfer
    virtual bool TransferDataToWindow();
    virtual bool TransferDataFromWindow();

    /// Set/get tooltip show flag
    static void SetShowToolTips(bool show) { m_showToolTips = show; }
    static bool GetShowToolTips() { return m_showToolTips; }

////@begin wxTTSMP3SettingsPanel event handler declarations

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_APPLICATION_PREFERENCES_BROWSE_LAME_PROGRAM_LOCATION
    void OnApplicationPreferencesBrowseLameProgramLocationClick( wxCommandEvent& event );

////@end wxTTSMP3SettingsPanel event handler declarations

////@begin wxTTSMP3SettingsPanel member function declarations

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end wxTTSMP3SettingsPanel member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin wxTTSMP3SettingsPanel member variables
    wxHyperlinkCtrl* m_lameHyperlinkCtrl;
    wxTextCtrl* m_lameProgramLocation;
    wxChoice* m_bitRateCtrl;
    wxStaticText* m_bitRateDescriptionCtrl;
    /// Control identifiers
    enum {
        ID_TTSMP3SETTINGSPANEL = 13100,
        ID_APPLICATION_PREFERENCES_GENERATE_MP3 = 13102,
        ID_APPLICATION_PREFERENCES_GET_LAME = 13101,
        ID_APPLICATION_PREFERENCES_LAME_PROGRAM_LOCATION = 13103,
        ID_APPLICATION_PREFERENCES_BROWSE_LAME_PROGRAM_LOCATION = 13104,
        ID_APPLICATION_PREFERENCES_BITRATE = 13105
    };
////@end wxTTSMP3SettingsPanel member variables

    wxMP3EncoderInfo     m_info;
    static bool          m_showToolTips;
};

#endif
    // _TTSMP3SETTINGSPANEL_H_
